//
//  VideoModel.m
//  OpenEyes
//
//  Created by dlios on 15/9/16.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "VideoModel.h"

@implementation VideoModel

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    if ([key isEqualToString:@"description"]) {
        self.myDescription = value;
    }
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.date forKey:@"date"];
    [aCoder encodeObject:self.title forKey:@"title"];
    [aCoder encodeObject:self.myDescription forKey:@"myDescription"];
    [aCoder encodeObject:self.category forKey:@"category"];
    [aCoder encodeObject:self.provider forKey:@"provider"];
    [aCoder encodeObject:self.duration forKey:@"duration"];
    [aCoder encodeObject:self.coverForFeed forKey:@"coverForFeed"];
    [aCoder encodeObject:self.coverBlurred forKey:@"coverBlurred"];
    [aCoder encodeObject:self.playUrl forKey:@"playUrl"];
    [aCoder encodeObject:self.playInfo forKey:@"playInfo"];
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.date = [aDecoder decodeObjectForKey:@"date"];
        self.title = [aDecoder decodeObjectForKey:@"title"];
        self.myDescription = [aDecoder decodeObjectForKey:@"myDescription"];
        self.category = [aDecoder decodeObjectForKey:@"category"];
        self.provider = [aDecoder decodeObjectForKey:@"provider"];
        self.duration = [aDecoder decodeObjectForKey:@"duration"];
        self.coverForFeed = [aDecoder decodeObjectForKey:@"coverForFeed"];
        self.coverBlurred = [aDecoder decodeObjectForKey:@"coverBlurred"];
        self.playUrl = [aDecoder decodeObjectForKey:@"playUrl"];
        self.playInfo = [aDecoder decodeObjectForKey:@"playInfo"];
    }
    return self;
}


@end
